package com.ad.pet.app.mall.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ad.pet.R;
import com.ad.pet.common.data.utils.glide.GlideUtil;

import java.util.List;

/**
 * Created by SEELE on 2019/6/11.
 */

public class GoodPhotoAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
    public GoodPhotoAdapter(@Nullable List<String> data) {
        super(R.layout.item_good_photo, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {
        ImageView imageView =  helper.getView(R.id.iv);

//        LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) imageView.getLayoutParams();
//        params.width = LyxUtils.getWinWidth(mContext);
//        imageView.setLayoutParams(params);
        GlideUtil.loadDrawable(mContext,item,imageView);
    }
}
